package chapter19_Enum;

/**
 * Date: 2019/6/18
 * Time: 14:51
 * User: Driss.
 * Description：
 */
public enum SpaceShip {
    SCOUT,CARGO,TRANSPORT,CRUISER,BATTLESHIP,MOTHERSHIP;

    public String toString(){
        String id = name();
        String lower = id.substring(1).toLowerCase();
        return id.charAt(0) + lower;
    }

    public static void main(String[] args) {
        for(SpaceShip s : values()){
            System.out.println(s);
        }
    }
}
